package eaxm;

/**
 * @Auther:小陈的Java
 * 编写自定义异常，并使用
 */
public class Number11 {
    public  static double getSalary(double money){
        if (money <0){
            throw new Number("工资不能为负数");
        }
        return money;
    }

    public static void main(String[] args) {
        getSalary(-10);
    }
}
class Number extends RuntimeException{
    private static final long serialVersionUID = 1L;
    public Number() {
    }
    public Number(String message) {
        super(message);
    }
}